package model.banco;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConexaoFactory {

	public Connection getConnection() {
		try {
			return DriverManager.getConnection(
					"jdbc:postgresql://localhost:5432/postgres/academia",
					"postgres", "flf.edu.br");
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	public static void main(String[] args) {
		if(new ConexaoFactory().getConnection() != null){
			System.out.println("Conectou...");
			
		}
		
	}

}
